package us.cirion.adventure.engine.result;

import us.cirion.adventure.engine.GameDisplay;
import us.cirion.adventure.engine.Result;

/**
 * LoadGame orders the user interface to restore the game to a previously saved state.
 * This is generally appropriate to invoke in reaction to a player command to load a game,
 * but may be triggered at other points in the game as well.  The user interface has
 * authority to determine the semantics of "Load Game" - it may retrieve a single save slot,
 * present a menu of saves to the user, or take some other action.
 * @author Chris
 *
 */
public class LoadGame implements Result {
	
	private GameDisplay gameDisplay;
	
	/**
	 * Constructs a new command to load a saved game.
	 * @param gameDisplay The user interface responsible for initiating the game load.
	 */
	public LoadGame(GameDisplay gameDisplay)
	{
		this.gameDisplay = gameDisplay;
	}

	/**
	 * Loads a previously saved game.
	 */
	public void execute() {
		gameDisplay.loadGame();
	}

}
